package com.cnswhy.cloud.server.system.dto;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.cnswhy.cloud.common.core.base.entity.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 用户操作日志表
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "LogUpdateDTO", description = "用户操作日志表")
public class LogUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotNull(message = "id不能为空", groups = SuperEntity.Update.class)
    private Long id;

    /**
     * 操作用户
     */
    @ApiModelProperty(value = "操作用户")
    @Length(max = 50, message = "操作用户长度不能超过50")
    private String username;
    /**
     * 操作内容
     */
    @ApiModelProperty(value = "操作内容")
    @Length(max = 65535, message = "操作内容长度不能超过65,535")
    private String operation;
    /**
     * 耗时
     */
    @ApiModelProperty(value = "耗时")
    private Long time;
    /**
     * 操作方法
     */
    @ApiModelProperty(value = "操作方法")
    @Length(max = 65535, message = "操作方法长度不能超过65,535")
    private String method;
    /**
     * 方法参数
     */
    @ApiModelProperty(value = "方法参数")
    @Length(max = 65535, message = "方法参数长度不能超过65,535")
    private String params;
    /**
     * 操作者IP
     */
    @ApiModelProperty(value = "操作者IP")
    @Length(max = 64, message = "操作者IP长度不能超过64")
    private String ip;
    /**
     * 操作地点
     */
    @ApiModelProperty(value = "操作地点")
    @Length(max = 50, message = "操作地点长度不能超过50")
    private String location;
}
